import React from 'react'
import { Button, message } from 'antd'
import { UdModal } from '../../index'

const Demo = () => {
  return <Button type="primary" onClick={openModal}>打开弹窗</Button>
}

const openModal = () => {
  UdModal.open({
    title: '弹框基本用法',
    content: <div>类型为 ReactNode</div>,
    onOk: () => {
      message.success('点击确定')
    },
    onCancel: () => {
      message.error('点击取消')
    }
  })
}

export default Demo
